/**
 * Grid containing values visible to user
 * @author W Wang
 */
public class UserGrid extends Grid{
	public Grid userGrid;
	
	public UserGrid(Grid maskGrid, Grid solnGrid) {
		initialise(maskGrid, solnGrid);
	}
	
	public void initialise(Grid maskGrid, Grid solnGrid) {
		int i = 0;
		int j = 0;
		while( i < 9 ) {
			while ( j < 9 ) {
				if( maskGrid.getNum(i, j) == 1 ) {
					userGrid.setNum(i, j, solnGrid.getNum(i, j));
					j++;
				}
			}
			i++;
		}
	}
	
	public void newNum(int x, int y, int input) {
		if( userGrid.getNum(x, y) == 0 ) {
			userGrid.setNum(x, y, input);
		}
	}	
	
}